<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title>Login</title>
			<link rel="stylesheet" type="text/css" href="css/index.css">
			<SCRIPT type="text/javascript">
				function changeLanguage(){
					var selectBox = document.getElementById('setLocale');
					var selectedIndex = selectBox.selectedIndex;
					var selectedValue = selectBox.options[selectedIndex].value;
					window.location.href='changeLanguage.action?request_locale='+selectedValue;
					}
			</SCRIPT>
	</head>
	<body>
		<div id="all">
			<div id="logo">
				<div id="logo_text">
					<h2>TEACHING MANAGEMENT</h2>
				</div>
			</div>
			<div id="main">
				<div id="logo_img">
						
						<img src="images/index_image1.jpg" alt="" width="270" height="200"></img>
				</div>
				
				<div id="login_form">
					<span>&nbsp;<b><s:text name="user.text.login.in"></s:text></b></span>
					<s:form action="loginUser.action" >
						<s:textfield name="user.username" key="user.form.username"
							cssClass="textlength"></s:textfield>
						<s:password name="user.password"  key="user.form.password"
							cssClass="textlength"></s:password>
						<s:submit key="user.form.submit"/>
					</s:form>
					<s:if test="#parameters.err != null"><span class="error_text_index"><s:text name="user.text.check.your.username.or.password" /></span></s:if>
					<s:if test="#parameters.no_login != null"><span class="error_text_index1"><s:text name="user.text.please.login.first" /></span></s:if>
					<s:else>&nbsp;</s:else><br />
					<s:text name="user.text.have.an.account" /><br /><a href="register.jsp"><s:text name="user.text.sign.up" /></a><br />
					<div id="changeLanguage">
						<s:select id="setLocale" list="#{'language':'language','en_US':'en','zh_CN':'cn'}" onchange="changeLanguage();" label="语言"/>
					</div>
				</div>
			</div>
				<br />
			<div id="footer" >
				<div id="footer_link">
					<span class="footer_linktext"><s:text name="user.text.about" /></span>
					<span class="footer_linktext"><s:text name="user.text.contact.us" /></span>
					<span id="footer_define">
						&copy; 2010 | design All Rights Reserved.
						<img src="images/2010xhml.gif"></img>
					</span>
				</div>
			</div>
		</div>
	</body>
</html>
